﻿using System;
using ProtoBuf;

namespace Wise.TimeWarrior.DTO
{
    /// <summary>
    /// Method describes process data 
    /// </summary>
    [ProtoContract]
    [Serializable]
    public class ProcessDto
    {
        /// <summary>
        /// Process Start Date
        /// </summary>

        [ProtoMember(1)]
        public DateTime? ProcessStartDate { get; set; }
        /// <summary>
        /// Process NAme
        /// </summary>

        [ProtoMember(2)]
        public string ProcessName { set; get; }
        /// <summary>
        /// Process WIndow Name
        /// </summary>

        [ProtoMember(3)]
        public string WindowName { set; get; }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="processStartDate">ProcessStartDate</param>
        /// <param name="processName">ProcessName</param>
        /// <param name="windowName">WindowName</param>
        public static ProcessDto Create(DateTime? processStartDate, string processName, string windowName)
        {
            return new ProcessDto()
            {
                ProcessStartDate = processStartDate,
                ProcessName = processName,
                WindowName = windowName,
            };
        }
    }
}
